﻿namespace Morus.Infrastructure
{
    using System;
    using System.Linq.Expressions;

    public interface ISpecification<T>
         where T : class
    {
        ISpecification<T> And(ISpecification<T> other);
        ISpecification<T> Or(ISpecification<T> other);
        ISpecification<T> Not();
        ISpecification<T> AndNot(ISpecification<T> other);

        bool IsStatisfiedBy(T target);

        Expression<Func<T, bool>> Expression { get; }
    }
}
